<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <style>
    html,
    body,
    #root {
      height: 100%;
      margin: 0;
      padding: 0;
      text-align: center;
      background-image: linear-gradient(
        to left,
        rgb(207, 64, 64),
        rgb(62, 62, 220)
      );
    }
    .btn1 {
      margin-top: 330px;
      width: 200px;
      height: 100px;
      border-radius: 5px;
      background-image: linear-gradient(
        to left,
        rgba(49, 197, 230, 0.648),
        rgb(62, 62, 220)
      );
      color: rgb(158, 36, 119);
      border: 3px solid rgb(66, 174, 141);
    }
    .bg {
      width: 100%;
      height: 100%;
      border: 1px solid;
      background-color: gray;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .text {
      border: 1px solid pink;
      background-color: rgb(86, 131, 131);
      display: flex;
      justify-content: space-around;
      align-items: center;
      flex-direction: column;
      width: 300px;
      height: 300px;
    }
  </style>
  <body>
    <div id="root">
      <button @click="wow=!wow" v-show="!wow" class="btn1">你点一下试试</button>

      <modal :wowz="wow" @send="send"></modal>
    </div>
  </body>
</html>
<template id="aa">
  <div class="bg" v-show="wowz">
    <div class="text">
      <span>天翔龙闪</span>

      <span>绯村剑心</span>

      <button @click="$emit('send',wowz2)">拔刀斋</button>
    </div>
  </div>
</template>
<script src="http://unpkg.zhimg.com/vue@2"></script>
<script>
  Vue.component("modal", {
    template: "#aa",
    props: ["wowz"],
    data() {
      return {
        wowz2: false
      }
    }
  })
  const vm = new Vue({
    el: "#root",
    data: {
      wow: false
    },
    methods: {
      send(input) {
        this.wow = input
      }
    }
  })
</script>
